<template>
	  <view  class="navbar">
	   <view @click="onBack" class="title">{{ title }}</view>
	  </view>
</template>

<script>
export default {
  props: {
    title: {
      type: String,
      default: "标题",
    },
  },
  methods: {
    onBack() {
      uni.switchTab();
    },
  },
};
</script>

<style >
.navbar {
  height: 176rpx;
  display: flex;
  padding-left: 32rpx;
  padding-top: 100rpx;
/* background: linear-gradient(0deg,  #7BED73 ,#1BE820) !important; */
/* background: linear-gradient(0deg,  #7BED73 ,#00EE12) !important; */
 background: #1BE820 !important;
  color: white;
  
   position: fixed; /* 固定在顶部 */
    top: 0;
    left: 0;
    width: 100%; /* 占满屏幕宽度 */
	z-index: 10; /* 确保层级高于其他内容 */
}
.title {
  font-size: 40rpx;
  font-weight: bold;
}
</style>
